---@class Table_GlobalHelpItem
local Table_GlobalHelpItem = BaseClass("Table_GlobalHelpItem", IDataItem)

function Table_GlobalHelpItem:__ctor()
	---@type number @唯一ID
	self.Id = 0
	---@type number @对话标题ID
	self.Title = 0
	---@type number @内容ID
	self.ContentId = 0
	---@type string @按钮文本ID
	self.BtnName = ""
	---@type boolean @是否显示关闭
	self.TapClose = false
end

function Table_GlobalHelpItem:Load(reader)
	self.temp = reader:ReadShortString()
	self.Id = tonumber(self.temp)
	self.temp = reader:ReadShortString()
	self.Title = tonumber(self.temp)
	self.temp = reader:ReadShortString()
	self.ContentId = tonumber(self.temp)
	self.BtnName = reader:ReadString()
	self.TapClose = reader:ReadBool()
end

---@class Table_GlobalHelpMgr : IDataMgr
local this = BaseClass("Table_GlobalHelpMgr", IDataMgr)

function this:FileName()
	return "Txt/GlobalHelp.txt"
end

---@return Table_GlobalHelpItem
function this:GetItemByKey(key)
	return self.super.GetItemByKey(self, key)
end

---@return Table_GlobalHelpItem
function this:GetItemByIdx(idx)
	return self.super.GetItemByIdx(self, idx)
end

function this:Load(reader)
	local item = Table_GlobalHelpItem()
	item:Load(reader)
	self.mItemDic[item.Id] = self.mDataCount
	table.insert(self.mItemList, item)
end

---@type Table_GlobalHelpMgr
Table_GlobalHelpMgr = this()